// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 获取电站的结构数据 GET /station/struct/detail */
export async function stationStructControllerGetStationStruct(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationStructControllerGetStationStructParams,
  options?: { [key: string]: any },
) {
  return request<API.StationStructDTO>(`${apiPrefix}/station/struct/detail`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 保存站点的结构数据 POST /station/struct/save */
export async function stationStructControllerSaveStationStruct(
  body: API.StationStructDTO,
  options?: { [key: string]: any },
) {
  return request<boolean>(`${apiPrefix}/station/struct/save`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查找配置了结构的历史站点 GET /station/struct/search */
export async function stationStructControllerGetStructStations(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationStructControllerGetStructStationsParams,
  options?: { [key: string]: any },
) {
  return request<API.SearchStationResp[]>(`${apiPrefix}/station/struct/search`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
